var express = require('express');
var router = express.Router();
const seatsApi = require("../api/seats");

/**
 * @swagger
 * /seats/searchSeats:
 *    get:
 *      tags:
 *      - 座位模块          # 接口分类
 *      summary: 座位查询接口   # 接口备注
 *      description: 查询座位   # 接口描述
 *      consumes:
 *      - "application/json"    # 接口接收参数类型
 *      parameters:
 *        - in: query
 *          name: theaterId
 *          schema:
 *            type: string
 *            default: "60de6e9e03c80c3a24d6c8e8"
 *          description: 放映厅ID
 *      responses:  # 响应
 *        200:     # http状态码
 *          description: "成功" # 返回 code 码描述
 * */
router.get('/searchSeats', async function (req, res, next) {
    const { theaterId } = req.query;
    const data = await seatsApi.searchSeats({ theaterId, row: 9, col: 9 });
    res.send(data)
});




module.exports = router;
